package core;

import dbms.DBAddingFunctions;
import dbms.DBCheckAndConfigurationFunctions;
import dbms.DBParameters;
import dbms.DBTables;

public class Configuration {

	public static boolean isConfigured()
	{
		if(!DBCheckAndConfigurationFunctions.isDBConfigured()) return false;
		
		return true;
	}
	
	public static boolean createDB()
	{
		return DBTables.createDB();
	}
	
	public static boolean setClientMainPath(String mainDir)
	{
		return DBCheckAndConfigurationFunctions.setClientMainDir(mainDir);
	}
	
	public static boolean setProgramExecutingName(String programName, String executingName)
	{
		return DBAddingFunctions.setProgramParameter(programName, DBParameters.PROGRAMEXECUTINGNAME, executingName);
	}

	public static boolean setProgramDir(String programName, String dir)
	{
		return DBAddingFunctions.setProgramParameter(programName, DBParameters.PROGRAMDIR, dir);
	}
	
	public static boolean setProgramType(String programName, String type)
	{
		return DBAddingFunctions.setProgramParameter(programName, DBParameters.PROGRAMTYPE, type);
	}
	
}
